# 求出类别为Sports的游戏在北美、欧洲、日本和其他地区的销售总额
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt

# 设置绘图风格
plt.style.use("ggplot")

plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['SimHei', 'Arial Unicode MS']
plt.rcParams["axes.unicode_minus"] = False


data = pd.read_csv('../bysj/data/电子游戏销量数据集.csv')
data.drop_duplicates(inplace=True)
Platform_data = data.groupby(by=['Genre'])[['NA_Sales', 'EU_Sales', 'JP_Sales', 'Other_Sales']].sum()
Sports = Platform_data.loc['Sports', :]
print(Sports)


